#ifndef GRAPHICSPANEL_H
#define GRAPHICSPANEL_H

#include <QtGui>
#include <QTextStream>
#include <QGraphicsView>
#include <QGraphicsScene>
#include <QPen>

#include <QBrush>
#include <QSettings>
#include <qDebug>



class GraphicsPanel: public QObject {
    Q_OBJECT

public:
        GraphicsPanel( QGraphicsView *gv,QTextBrowser *tb , int panel_no ) ;
        void setSpinBox(QSpinBox *,QSpinBox *,QSpinBox *,QSpinBox *);
        void setButton(QPushButton *,QPushButton *,QPushButton *);
        void setAlign (Qt::Alignment ali) ;
        void setScene( int x, int y, int w, int h ) ;
        void draw( int size ) ;
        void setBackgroundBrash( QBrush bg);
        void setScale(int x, int y);
        void setRotate( int d);



public slots:
       void slotScalling_x(int i);
       void slotScalling_y(int i);
       void slotTranslate_x(int i);
       void slotTranslate_y(int i);
       void slotMapPointShow(bool t);
       void slotBackgroundLayerDraw(bool);
       void slotInfoCrear();

private:
       void infoOut( );

       QGraphicsView *graphicsView;
       QGraphicsScene  *graphicsScene;
       QTextBrowser *textBrowser;

	   int panel_no;

       QSpinBox *spinBox1;
       QSpinBox *spinBox2;
       QSpinBox *spinBox3;
       QSpinBox *spinBox4;

       QPushButton  *pushButtonA;
       QPushButton  *pushButtonB;
       QPushButton  *pushButtonC;

       QPen pen1;
       QPen pen2;
       QBrush brush;

       int old_x_scale;
       int old_y_scale;
       int old_x_translate;
       int old_y_translate;

QGraphicsItem * additem;

};

#endif
